import Vue from 'vue'
import Router from 'vue-router'
import Footer from '@/components/Footer'
import inspection from '@/views/inspection'
import repairman from '@/views/repairman'
import parts from '@/views/parts'
import mine from '@/views/mine'

Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            name: 'login',
            component: resolve => require(['@/views/login'], resolve)
        },
        // {
        //     path: '/',
        //     name: 'ScanQRCode',
        //     component: resolve => require(['@/components/ScanQRCode'], resolve)
        // },
        // {
        //     path: '/',
        //     name: 'inspection',
        //     component: resolve => require(['@/views/inspection'], resolve)
        // },
        {
            path: '/Footer',
            name: 'Footer',
            component: Footer,
            redirect: '/Footer/inspection',
            children: [{
                    path: '/inspection',
                    name: 'inspection',
                    component: inspection
                },
                {
                    path: '/repairman',
                    name: 'repairman',
                    component: repairman
                },
                {
                    path: '/parts',
                    name: 'parts',
                    component: parts
                },
                {
                    path: '/mine',
                    name: 'mine',
                    component: mine
                }
            ]
        },
        {
            path: '/inspectionbillDetail',
            name: 'inspectionbillDetail',
            component: resolve => require(['@/views/inspectionbillDetail'], resolve)
        },
        {
            path: '/inspectionConfirmation',
            name: 'inspectionConfirmation',
            component: resolve => require(['@/views/inspectionConfirmation'], resolve)
        },
        {
            path: '/repairmanDetail',
            name: 'repairmanDetail',
            component: resolve => require(['@/views/repairmanDetail'], resolve)
        },
        {
            path: '/repairmanHistory',
            name: 'repairmanHistory',
            component: resolve => require(['@/views/repairmanHistory'], resolve)
        },
        {
            path: '/repairmanFollow',
            name: 'repairmanFollow',
            component: resolve => require(['@/views/repairmanFollow'], resolve)
        },
        {
            path: '/repairmanEnd',
            name: 'repairmanEnd',
            component: resolve => require(['@/views/repairmanEnd'], resolve)
        },
        {
            path: '/partApplyDetail',
            name: 'partApplyDetail',
            component: resolve => require(['@/views/partApplyDetail'], resolve)
        },
        {
            path: '/partApplyBut',
            name: 'partApplyBut',
            component: resolve => require(['@/views/partApplyBut'], resolve)
        },
        {
            path: '/partStorehouse',
            name: 'partStorehouse',
            component: resolve => require(['@/views/partStorehouse'], resolve)
        },
        {
            path: '/partGoodsSelection',
            name: 'partGoodsSelection',
            component: resolve => require(['@/views/partGoodsSelection'], resolve)
        },
        {
            path: '/partGoodsClass',
            name: 'partGoodsClass',
            component: resolve => require(['@/views/partGoodsClass'], resolve)
        },
        {
            path: '/transitionRL',
            name: 'transitionRL',
            component: resolve => require(['@/views/transitionRL'], resolve)
        }
    ]
})